<template>
  <div>
    <span>基础树，数据1000，最大深度五</span>
    <aty-tree :data="data" />
  </div>
</template>
<script>
const _draggable = true
let _dynimicId = 1
export default {
  data () {
    return {
      data: (function (len) {
        var _data = []
        let k = 0
        for (let i = 0; i < len; i++) {
          k++
          _data.push(
            {
              name: '一级 ' + k,
              id: '' + k,
              open: true,
              checked: true,
              draggable: _draggable,
              icon: '/static/treeIcon/avatar.png',
              children: [{
                id: k + '-' + k,
                name: '二级 ' + k + '-' + k,
                icon: '/static/treeIcon/avatar.png',
                draggable: _draggable,
                children: [{
                  icon: '/src/components/css/images/treeIcon/avatar.png',
                  id: k + '-' + k + '-' + k,
                  name: '三级 ' + k + '-' + k + '-' + k,
                  draggable: _draggable,
                  children: [{
                    icon: '/src/components/css/images/treeIcon/avatar.png',
                    id: k + '-' + k + '-' + k + '-' + k,
                    name: '四级 ' + k + '-' + k + '-' + k + '-' + k,
                    draggable: _draggable,
                    children: [{
                      icon: '/src/components/css/images/treeIcon/avatar.png',
                      id: k + '-' + k + '-' + k + '-' + k + '-' + k,
                      name: '五级 ' + k + '-' + k + '-' + k + '-' + k + '-' + k,
                      draggable: _draggable
                    }]
                  },
                  {
                    icon: '/src/components/css/images/treeIcon/avatar.png',
                    id: k + '-' + k + '-' + k + '-' + k + '2',
                    name: '三级 ' + k + '-' + k + '-' + k + '-' + k + '2',
                    draggable: _draggable
                  }]
                }
                ]
              },
              {
                id: k + '-' + k + '00',
                draggable: _draggable,
                name: '二级 ' + k + '-' + k + '000'
              }]
            }
          )
        }
        return _data
      })(1000)
    }
  }
}
</script>